﻿using CanvasMod.Views;
using DemoPrism.Core;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Navigation.Regions;

namespace CanvasMod
{
    public class CanvasModModule : IModule
    {
        private readonly IRegionManager _regionManager;

        public CanvasModModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {
            _regionManager.RequestNavigate(RegionNames.ContentRegion, "CanvasMain");
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<CanvasMain>();
        }
    }
}